using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class FatableMap : EntityTypeConfiguration<Fatable>
    {
        public FatableMap()
        {
            // Primary Key
            this.HasKey(t => t.TABLE);

            // Properties
            this.Property(t => t.TABLE)
                .IsRequired()
                .HasMaxLength(15);

            this.Property(t => t.File_Primary_Key)
                .HasMaxLength(10);

            // Table & Column Mappings
            this.ToTable("Fatables");
            this.Property(t => t.YEAR1).HasColumnName("YEAR1");
            this.Property(t => t.YEAR2).HasColumnName("YEAR2");
            this.Property(t => t.YEAR3).HasColumnName("YEAR3");
            this.Property(t => t.YEAR4).HasColumnName("YEAR4");
            this.Property(t => t.YEAR5).HasColumnName("YEAR5");
            this.Property(t => t.YEAR6).HasColumnName("YEAR6");
            this.Property(t => t.YEAR7).HasColumnName("YEAR7");
            this.Property(t => t.YEAR8).HasColumnName("YEAR8");
            this.Property(t => t.YEAR9).HasColumnName("YEAR9");
            this.Property(t => t.YEAR10).HasColumnName("YEAR10");
            this.Property(t => t.YEAR11).HasColumnName("YEAR11");
            this.Property(t => t.YEAR12).HasColumnName("YEAR12");
            this.Property(t => t.YEAR13).HasColumnName("YEAR13");
            this.Property(t => t.YEAR14).HasColumnName("YEAR14");
            this.Property(t => t.YEAR15).HasColumnName("YEAR15");
            this.Property(t => t.YEAR16).HasColumnName("YEAR16");
            this.Property(t => t.YEAR17).HasColumnName("YEAR17");
            this.Property(t => t.YEAR18).HasColumnName("YEAR18");
            this.Property(t => t.YEAR19).HasColumnName("YEAR19");
            this.Property(t => t.YEAR20).HasColumnName("YEAR20");
            this.Property(t => t.YEAR21).HasColumnName("YEAR21");
            this.Property(t => t.YEAR22).HasColumnName("YEAR22");
            this.Property(t => t.YEAR23).HasColumnName("YEAR23");
            this.Property(t => t.YEAR24).HasColumnName("YEAR24");
            this.Property(t => t.YEAR25).HasColumnName("YEAR25");
            this.Property(t => t.YEAR26).HasColumnName("YEAR26");
            this.Property(t => t.YEAR27).HasColumnName("YEAR27");
            this.Property(t => t.YEAR28).HasColumnName("YEAR28");
            this.Property(t => t.YEAR29).HasColumnName("YEAR29");
            this.Property(t => t.YEAR30).HasColumnName("YEAR30");
            this.Property(t => t.YEAR31).HasColumnName("YEAR31");
            this.Property(t => t.YEAR32).HasColumnName("YEAR32");
            this.Property(t => t.YEAR33).HasColumnName("YEAR33");
            this.Property(t => t.YEAR34).HasColumnName("YEAR34");
            this.Property(t => t.YEAR35).HasColumnName("YEAR35");
            this.Property(t => t.YEAR36).HasColumnName("YEAR36");
            this.Property(t => t.YEAR37).HasColumnName("YEAR37");
            this.Property(t => t.YEAR38).HasColumnName("YEAR38");
            this.Property(t => t.YEAR39).HasColumnName("YEAR39");
            this.Property(t => t.YEAR40).HasColumnName("YEAR40");
            this.Property(t => t.TABLE).HasColumnName("TABLE");
            this.Property(t => t.File_Primary_Key).HasColumnName("File Primary Key");
        }
    }
}
